<!doctype html>
<html>
<title></title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta content="telephone=no" name="format-detection" />
<!--<link id="shortIcon" rel="shortcut icon" href="images/shorcut.png">-->
<link id="pasteDesktop" href="images/pasteDesktop.png" rel="apple-touch-icon-precomposed">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta id="viewport" name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,user-scalable=no,target-densitydpi=260">
<link rel="stylesheet" type="text/css" href="css/index.css">
<link rel="stylesheet" type="text/css" href="home.css" />
<link rel="stylesheet" type="text/css" href="common.css">

<script src="js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="js/scrollPic.min.js"></script>
<script type="text/javascript" src="js/iScroll4.2.5-min.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src="js/jquery.alert.js"></script>
<!--<script src="js/iScroll4.2.5-min.js"></script>-->
<script src="js/base64.js"></script>
<link type="text/css" href="css/jquery.alert.css" rel="stylesheet"/>
<script src="js/jquery.getparm.js"></script>
<script src="js/index.js"></script>
<script type="text/javascript" src="js/common.js?version=0331"></script>
<script type="text/javascript">
//var jsonserver="http://192.168.6.52:8090/";
//var temp_server="http://192.168.10.57:8080/nature/";

var fid=$.cookie("NP_INFO_ID");
var ukey=$.cookie("U_KEY");
var usernum=$.cookie("NP_INFO_TELNO");
var requestParam=$.getUrlParam("rp");
var newFlag=$.cookie("newuser");
var userEmail=$.cookie("email");
var restWidth=150;//向左或者向右滑动之后预留的宽度
var imgScroll;
var liWindth;
var sp=new ScrollPic();
try{
addEventListener("orientationchange", function() {
	 setTimeout(hideURLbar, 0); 
	// resize(); 
	 
}, false);
}catch(e){}

$(document).ready(function(e) {
	//加载广告banner
	readImg();
	if(versionFlag=="bj"){
		sp.scrollContId   = "bannerDiv"; //内容容器ID
		setTimeout(function(){
			var winWidth=document.body.clientWidth;
			$("#bannerDiv img").width(winWidth-9);
			 sp.frameWidth     = winWidth;//显示框宽度
			 sp.speed          = 30; //移动速度(单位毫秒，越小越快)
			 sp.space          = 60; //每次移动像素(单位px，越大越快)
			 sp.autoPlay=true;
			 sp.autoPlayTime   = 3; //自动播放间隔时间(秒)
			 sp.initialize(); //初始化 
		},700);
		$("#u48").hide();
		$("#title_").text("WO的外快");
		document.title="WO的外快";
	}else{
		
		$("#u48").show();
		$("#title_").text("星火平台");
		document.title="星火平台";
	}
	
  	
	initU48();
	//初始化消息数目
	initMsg();
	//初始化页面中间内容
	initMyCommission();
	
	var contentURl2=jsonserver+"home_timeOnline.do";
	var contentParamsStr2="natureid="+fid+"&Ukey="+ukey;

	$.natureajax({
			url:contentURl2+"?callback=?",//获取JSON
			data:contentParamsStr2,
			dataType:"jsonp",
			success:function(json){
				var timeLength=json[1].length;
				var timeRec=json[1];
				var result=0;
				$.each(timeRec,function(i,items){
					result+=items.PAISONG+items.JIEGUO+items.BANLI;
				});
				//	alert(result);
				if(newFlag=="isNull" && result<1){
					firstLoginInitData();
					//alert("localStorage存储的fid为:"+localStorage.getItem(fid));
					//alert("userEmail为:"+userEmail);
					if(localStorage.getItem(fid)==null && userEmail==null){
						$(".floatBoxBg").show();
						$(".middle1").show();
					}
				}else{
					initContent();
				}
					

			},
			error:function(){
				alert("报错了");
			}
			
		})
	//initContent();
	//填资料并且无推荐,显示引导页
	
	//firstLoginInitData();
	$("#usernum").text(usernum);

	$(".msgTd").click(function(){
		//获取窗口宽度
		window.location.href="message.html";
	});
	
	$("#repassword").blur(function () { 
		var password2 = $("#password").val();
		if(this.value==password2){

		}else{
			
			jConfirm("两次密码输入不一致",'验证',function(e){});
			}

		});
			
	$("input").focus(function(){
		
		if(this.value=="请输入找回密码的邮箱"||this.value=="请再次输入新密码" || this.value=="请输入新密码"){
			this.value="";
		}
		
		
	});
	$("input").blur(function(){
		if(this.value=="" || this.value.length==0 || this.value==null){
			jConfirm("输入不能为空",'验证',function(e){});
		}
	});
	$(window).resize(function(){
		setTimeout(function(){
			resize();
			},500);
		
	});
});

function readImg(){
	//var ju='http://118.212.184.127/newnp/';
	$("#bannerDiv").children().remove();
	var requestUrl=versionFlag=="jx"?"prod_getBannerWebDoc.do":"prod_getBannerAndroidDoc.do";
	//prod_getBannerWebDoc.do 江西
	$.natureajax({
			type: "get",
			url:jsonserver+requestUrl+"?",//获取JSON
			data:"callback=?&phoneno="+usernum,
			dataType:"jsonp",
			success:function(json){
				if(json[0].result==1){
					var imgStr='';
					$.each(json[1],function(i,items){
						if(versionFlag=="jx"){//江西banner无链接
							imgStr+='<img width="100%" src="'+json[1][i]+'"  height="88" style="margin:10px auto;padding-left:5px" id="banner'+(i+1)+'"/>';
						}else{
							imgStr+='<img width="100%" src="'+json[1][i]+'" onClick="window.location.href=\'huodongxiangqing.html\'" height="88" style="margin:10px auto;padding-left:5px" id="banner'+(i+1)+'"/>';
						}
					})
					$("#bannerDiv").append(imgStr);
				}
			},
			error:function(){
			alert("出错了!");
			}
			
		});
	//initScrollPic();
}

// 判断屏幕是否旋转
function orientationChange() { 
var winWidth=document.body.clientWidth;

    switch(window.orientation) { 
    　　case 0:  
            //alert("肖像模式 0,screen-width: " + screen.width + "; screen-height:" + screen.height); 
      		document.getElementById('bannerDiv').style.width = (winWidth-10)+'px';
            $("#bannerDiv img").width(winWidth-10);
            
            break; 
    　　case -90:  
            //alert("左旋 -90,screen-width: " + screen.width + "; screen-height:" + screen.height);
             document.getElementById('bannerDiv').style.width = (winWidth-10)+'px';
            $("#bannerDiv img").width(winWidth-10); 
            break; 
    　　case 90:    
            //alert("右旋 90,screen-width: " + screen.width + "; screen-height:" + screen.height); 
             document.getElementById('bannerDiv').style.width = (winWidth-10)+'px';
            $("#bannerDiv img").width(winWidth-10);
            break; 
    　　case 180:    
        　　//alert("风景模式 180,screen-width: " + screen.width + "; screen-height:" + screen.height); 
       document.getElementById('bannerDiv').style.width = (winWidth-10)+'px';
        $("#bannerDiv img").width(winWidth-10);
        　　break; 
    };};
// 添加事件监听 
try{
addEventListener('load', function(){ 
    orientationChange(); 
    window.onorientationchange = orientationChange; 
});}catch(e){}





function resize(){
		var winWidth=document.body.clientWidth;
		
		$("#bannerDiv").width(winWidth);
		if(detectDeviceType()=="Apple"){
			//alert("orientation"+window.orientation);
			if(window.orientation!=90 && window.orientation!=-90){
				//alert($("#bannerDiv img").width())
				$("#bannerDiv img").width(630);
			}else{
				$("#bannerDiv img").width(winWidth-9)
			}
		}else{
			$("#bannerDiv img").width(winWidth-9)
		}
		sp.frameWidth = winWidth;//显示框宽度
		sp.pageWidth      = winWidth-30; //翻页宽度
}





function initScrollPic(){
	
	

}

function hideDiv(){
	$(".floatBoxBg").hide();
	$(".middle1").hide();
	localStorage.setItem(fid,"1");
}

</script>
</head>

<body onresize="resize()">
<div class="floatBoxBg" style="display:none;"></div>
<div class="middle1" style=" display:none; position:absolute; z-index:999; width:90%; margin-left:5%; margin-top:150px;">
  <div class="border1" >
    <div style="color: #565656;font-size: 22px;">
      <select id="u48" style="height: 40px;border-radius: 4px; width:40%;border:1px solid #EFEFEF;padding-top: 5px;">
      </select>
    </div>
    <div style="margin-top: 10px;color: #EF4E16;font-size: 20px;"> 此密码与返佣账户密码一致！ </div>
    <div style="margin-top: 10px;color: #565656;font-size: 22px;"> 设置登录密码 </div>
    <div style="margin-top: 10px;color: #565656;font-size: 22px;">
      <input id="password" type="text" value="请输入新密码" maxlength="6"/>
    </div>
    <div style="margin-top: 10px;color: #565656;font-size: 22px;">
      <input id="repassword" type="text" value="请再次输入新密码" maxlength="6"/>
    </div>
    <div style="margin-top: 10px;color: #565656;font-size: 22px;">
      <input id="email" type="email" value="请输入找回密码的邮箱" />
    </div>
    <div class="okbtn" onClick="okBtnClick();">确定</div>
    <div class="xiaci"  onclick="hideDiv();">下次再说</div>
    <div style="height: 20px;"></div>
  </div>
</div>
<div style="position:absolute; left:90%; top:0px; z-index:99; text-align:center; line-height:40px; font-size: 28px;color:#fff; height:48px; width:66px;" id="msgCount"> </div>
<div id="header" style="text-align:center;" class="header">
  <table class="headerTal">
    <tr>
      <td class="menuTd"  >菜单</td>
      <td id="title_" style="font-size:32px; color:#fff;"></td>
      <td class="msgTd" width="20%">消息</td>
    </tr>
  </table>
</div>
<!-- 中间主页面 -->
<div id="content" style="width:100%">
  <div style="background:url(images/index/index_detailBg.png); height:70%; text-align:center">
   <!--<div id="wrapper">
        <div id="scroller" style="width:200%; margin:10px auto; text-align:center;">
        <ul>
        	<li style="width:50%; float:left;"><img width="100%" src="images/index/banner.png" onClick="window.location.href='huodongxiangqing.html'" height="88" style="margin:10px auto;padding-left:5px" id="banner1"/></li>
        	<li style="width:50%; float:left;"><img width="100%" src="images/index/banner.png" onClick="window.location.href='huodongxiangqing.html'" height="88" style="margin:10px auto;padding-left:5px" id="banner2"/></li>
        </ul>
        </div>
     </div>-->
     <!-- banner  -->
     
<!--<div id="bannerDiv" style="height:100px; margin-bottom:10px;">
<img width="100%" src="http://www.wojx.cn/newnp/images/banner_page/111.png" onClick="window.location.href='huodongxiangqing.html'" height="88" style="margin:10px auto;padding-left:5px" id="banner1"/>
</div>-->
<div id="ImgDiv" style="height:100px; margin-bottom:10px;">
<img id="screen_1" width="100%" src="images/screen_1.jpg"  height="88" style="margin:10px auto;padding-left:5px"/>
<img width="100%" src="images/screen_2.jpg"  height="88" style="margin:10px auto;padding-left:5px"/>
</div>
<div id="dot"></div>
     <!-- banner  -->
    <div id="moneyDetail" style="width:98%; margin:-2px auto; border-radius:8px; background:#fff; clear:both;">
      <table  width="100%" cellpadding="0">
        <tr height="92px">
          <td width="30%" rowspan="2" align="center"><img src="images/index/index_money.png"/>
            <div style=" border:1px #cccccc solid; border-radius:4px; height:45px; line-height:45px; margin-top:5px; width:55%;"  ><span id="curMonth">0</span> </div></td>
          <td rowspan="2" width="8" align="left"><img src="images/index/lian.png" width="8" height="162"></td>
          <td width="65%"><span id="showMoney">0</span><span id="showMoneyUnit">元佣金</span></td>
        </tr>
        <tr style="font-size:48px; height:60px;" >
          <td><div class="org_box"> <span class="org_box_cor cor3"></span><span id="moneyDesc"></span></div></td>
        </tr>
      </table>
    </div>
    <div class="timeLine"> </div>
  </div>
</div
  >
</div>
</div>
</body>
</html>
